signature ENV_STRUCTS =
sig
end

signature ENV =
sig
  include ENV_STRUCTS

  type key = string

  datatype types
    = Simple
    | Struct of key
    | Array of int * types
    | Pointer of types

  type 'b env
  type 'b struct_env 

  val calTypeSize : types -> 'b struct_env -> int
  val fromList : (key * 'b) list -> 'b env
  val toList : 'b env -> (key * 'b) list
  val creat : unit -> 'b env
  val creatse : unit -> 'b struct_env

  val lookup : key -> 'b env -> 'b option
  val lookupFL : key ->'b struct_env ->  'b env
  val lookupF : key -> key -> 'b struct_env -> ('b option)
  val enter : key -> 'a -> 'a env -> 'a env
  val enterS : key -> int -> ('b env) -> 'b struct_env -> 'b struct_env 

  val transSenv : ('b -> 'c) * ('b struct_env) -> (key * 'c list) list
end
